package com.zhengqing.design.action.strategy._01.service.impl;

import com.zhengqing.design.action.strategy._01.service.ICouponCalStrategy;

import java.math.BigDecimal;

/**
 * <p> 折扣券 </p>
 *
 * @author zhengqingya
 * @description
 * @date 2022/12/16 11:16
 */
public class DiscountCouponCalStrategy implements ICouponCalStrategy<BigDecimal> {
    @Override
    public BigDecimal calPrice(BigDecimal price, BigDecimal discount) {
        // ex：100*0.9
        return price.multiply(discount);
    }
}
